package ccm.component;

import ccm.common.CCMConfigManager;
import ccm.component.override.JFrame;
import ccm.component.override.JLabel;

import javax.swing.*;
import java.awt.*;
import java.util.Objects;

public class AboutJDialog extends JDialog
{
    public AboutJDialog(java.awt.Frame owner)
    {
        super(owner,JFrame.getTitleString("关于"),true);
        setSize(550,300);
        setLocationRelativeTo(null);
        setDefaultCloseOperation(WindowConstants.HIDE_ON_CLOSE);
        setResizable(false);
        setLayout(new FlowLayout());
        JLabel jLabel0=new JLabel("车车Monitor  (2.0dev)");
        jLabel0.setFont(CCMConfigManager.getFont("ccm/general/font"));
        JLabel jLabel1=new JLabel("made by 火星大王");
        jLabel1.setFont(CCMConfigManager.getFont("ccm/general/font"));
        JLabel jLabel2=new JLabel("欢迎访问蒟蒻云http://juruoyun.top");
        jLabel2.setFont(CCMConfigManager.getFont("ccm/general/font"));
        getContentPane().setBackground(new Color(0X00,0XFF,0X00));
        jLabel0.setForeground(new Color(0XFF,0X00,0X00));
        jLabel1.setForeground(new Color(0XFF,0X00,0X00));
        jLabel2.setForeground(new Color(0XFF,0X00,0X00));
        jLabel0.setFont(new Font("",Font.PLAIN,30));
        jLabel1.setFont(new Font("",Font.PLAIN,30));
        jLabel2.setFont(new Font("",Font.PLAIN,30));
        add(jLabel0);
        add(jLabel1);
        add(jLabel2);
        add(new JLabel(new ImageIcon(new ImageIcon(Objects.requireNonNull(AboutJDialog.class.getResource("/ccm/resource/img/huaji.png"))).getImage().getScaledInstance(100,100,java.awt.Image.SCALE_SMOOTH))));
    }
}
